<template>
	<view class="">
		<!-- <view class="tool-bar">
		<HeadNavs :title="'啵啵砍树'"></HeadNavs>
	</view> -->
		<web-view ref="webview" :src="toUrl"></web-view>
	</view>
</template>
<script>
export default {
	data() {
		return {
			toUrl: '',
			token: ''
		};
	},
	// onShow() {
	// 	this.sendMessageToH5();
	// },
	onLoad(option) {
		this.toUrl = option.url;
	},
	created() {
		// console.log(this.token, 'token');
	},
	mounted() {
		// window.addEventListener('message');
	},
	methods: {
		// sendMessageToH5() {
		// 	const self = this;
		// 	let currentWebview = this.$scope.$getAppWebview();
		// 	let wv = currentWebview.children()[0];
		// 	self.wv = wv;
		// 	plus.runtime.getProperty(plus.runtime.appid, function () {
		// 		self.wv.evalJS("getAppMessage('" + 222 + "')");
		// 	});
		// }
	}
};
</script>

<style lang="scss" scoped>
.tool-bar {
	position: fixed;
	top: 50rpx;
	right: 100;
	z-index: 9999;
}
</style>
